<!DOCTYPE html>
<!-- saved from url=(0043)https://account.meilishuo.com/user/register -->
<html>
<!--<![endif]-->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>注册 － 美丽说</title>
  <meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
  <meta property="qc:admins" content="173137167465514130576375">
  <meta name="chinaz-site-verification" content="500e4417-e595-40ac-98da-dec66c97a9e5">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Index/css/base.css">
  <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="/css/ie6.css?1605291101.1469378361" />
  <![endif]-->
  <link rel="apple-touch-icon-precomposed" href="http://i.meilishuo.net/css/images/custom_icon_precomposed.png">
  <link rel="icon" href="http://d04.res.meilishuo.net/pic/_o/75/6e/2f6871f198c0bd7615ffbf9a2f5f_49_48.c5.png" type="image/x-icon">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Index/css/register_new.css">
  <script type="text/javascript" src="__PUBLIC__/Index/js/-fml"></script>
  <script type="text/javascript" src="__PUBLIC__/Index/js/biu"></script>

  <style type="text/css">
        label.error{

          font-size: 12px;
          font-family: Arial;
          color:#FF6699;
        }

        #mobile.error,#nickname.error,#password.error,#conf_password.error,#yzcode.error{

          border:1px solid #FF6699;

        }


  </style>
</head>
<body>
  <div class="wrap">
    <div class="reg_wrap">
      <div class="head">
        <a href="https://account.meilishuo.com/" class="reg_logo">
          <img src="__PUBLIC__/Index/images/2016-08-03_191532.png"></a>
        <a href="https://account.meilishuo.com/" class="welcome_txt">
          <img src="__PUBLIC__/Index/images/2016-08-03_191844.png"></a>
      </div>
      <div class="main">
        <div class="ad_wrap">
          <img src="__PUBLIC__/Index/images/ad_img.jpg" width="370" height="353"></div>
        <div class="reg_form" id="mob_reg">

          <form id="registerForm" method="post"  action="<{:U('User/doRegister')}>">
            <h3>
              <a href="https://account.meilishuo.com/user/login">登录</a>注册美丽说</h3>
            <div class="reg_list">
              <p class="reg_box">
                <input class="reg_txt" id="mobile" name="mobile" type="text" value="请输入手机号" >
                <span></span>
                <span class="tel_icon">
                  <img src="__PUBLIC__/Index/images/2016-08-03_192505.png"></span>
              </p>
              <!-- <p class="mlsUserEor red_f"></p> --></div>
            <div class="reg_list">
              <p class="reg_box">
                <input class="reg_txt" id="nickname" name="nickname" type="text" value="昵称" autocomplete="off">
                <span></span>
                <span class="user_icon">
                  <img src="__PUBLIC__/Index/images/2016-08-03_192654.png"></span>
              </p>
              <!-- <p class="mlsUserEor red_f"></p> --></div>
            <div class="reg_list">
              <p class="reg_box">
                <input class="reg_txt" id="password" name="password" type="password" placeholder="密码" autocomplete="off">
                <span></span>
                <span class="pwd_icon">
                  <img src="__PUBLIC__/Index/images/2016-08-03_192815.png"></span>
              </p>
            </div>

              <div class="reg_list">
              <p class="reg_box">
                <input class="reg_txt" id="conf_password" name="conf_password" type="password" placeholder="确认密码" autocomplete="off">
                <span></span>
                <span class="pwd_icon">
                  <img src="__PUBLIC__/Index/images/2016-08-03_192815.png"></span>
              </p>
            </div>

              <div class="reg_list" >
              <p class="" style="">
                <div><input id="yzcode"  type="text"  name="code" style="width:85px;height:25px;padding-left:15px;font-size:15px;color:#B29F9F;float:left;margin-top:12px"></div>
                <div><img src="<{:U('Home/User/Verify')}>" style="float:left;margin-left:10px" id="yzm"></div>
                <div style="clear:both"></div>
              </p>
            </div>

            <!-- <div class="reg_list">                     <p class="reg_box" id="checkBox">                           <input type="text" class="reg_txt" id="checkcode" name="checkcode" value="" placeholder="请输入验证码" maxlength="4"/>                            <span class="checkImage code_img">                              <span class="codeImage" id="checkcodeImage">                                    <img width="92" height="36" isblank="true" src="http://i.meilishuo.net/css/images/register/blank.jpg">                              </span>                             <span class="reload_icon"></span>                           </span>                         <span class="code_icon"></span>                         <span class="success"></span>                       </p>                        <p class="checkCodeEor red_f"></p></div> -->

            <div class="regErrorMessage none_f"></div>
            <div class="reg_btn_wrap">
              <input type="submit" class="reg_btn" value="立即注册"></div>
            <div class="agree_reg">
              <input type="checkbox" checked="checked" id="agreement" name="agreement">同意
              <a href="https://account.meilishuo.com/agree" target="_blank">《美丽说注册条款》</a>
              <a target="_blank" href="https://account.meilishuo.com/rule">《美丽说平台消费者规则》</a></div>
          </form>
          <div class="fast_login">
            <h3>无需注册，即可登录</h3>
            <div class="fast_way">
              <a href="https://account.meilishuo.com/connect/auth/qzone" class="qq_way">
                <img src="__PUBLIC__/Index/images/2016-08-03_190845.png"></a>
              <a href="https://account.meilishuo.com/connect/auth/weibo" class="sina_way">
                <img src="__PUBLIC__/Index/images/2016-08-03_191046.png"></a>
              <a href="https://account.meilishuo.com/connect/auth/weixin" class="weixin_way">
                <img src="__PUBLIC__/Index/images/2016-08-03_191110.png"></a>
            </div>
          </div>
          <div class="more_way_wrap">
            <h4 onselectstart="return false;">更多登录方式&gt;&gt;</h4>
            <div class="more_way none_f">
              <a href="https://account.meilishuo.com/connect/auth/txweibo" class="txweibo"></a>
              <a href="https://account.meilishuo.com/connect/auth/douban" class="douban"></a>
              <a href="https://account.meilishuo.com/connect/auth/renren" class="renren"></a>
              <a href="https://account.meilishuo.com/connect/auth/baidu" class="baidu"></a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

</body>

        <script type="text/javascript" src="__PUBLIC__/Home/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Home/jquery.validate.js"></script>

    <script type="text/javascript">

    //下面的代码是让表单的默认值显示与消失
    function show(obj){

       obj.focus(function(event) {


          var curval = $(this).val();

          if(curval == this.defaultValue){

            $(this).val('');

          }else{

            $(this).val(curval);

          }


    });


     obj.blur(function(event) {

        var curval = $(this).val();


        if(curval == ''){

          $(this).val(this.defaultValue);

        }else{

          $(this).val(curval);
        }

    });


}

  show($("#mobile"));
  show($("#nickname"));
  show($("#yzcode"));



    // 手机验证的函数方法
  jQuery.validator.addMethod("mobile", function (value, element) {
    var mobile = /^1[3|4|5|7|8]\d{9}$/;
  return this.optional(element) || (mobile.test(value));
  }, "手机号格式有误，请重新输入！");

  //昵称验证的函数方法

    jQuery.validator.addMethod("nickname", function (value, element) {
    var name = /^[a-zA-Z0-9]{6,18}/;
  return this.optional(element) || (name.test(value));
  }, "输入的格式不对");

  //密码的验证函数
   jQuery.validator.addMethod("password", function (value, element) {
    var name = /\w{6,18}/;
  return this.optional(element) || (name.test(value));
  }, "密码太简单");


    $("#registerForm").validate({

      //给表单定规则
        rules:{

          //手机
          mobile:{

            required:true,

            mobile:true

          },

          //昵称
          nickname:{

            required:true,
            nickname:true,
            //这边是异步处理该昵称是否存在
            remote:{

              url:"<{:U('Home/User/checkNickname')}>",
              dataType:'json',
              type:'post',
              //下面是将填写的值异步传递到控制器去处理
              data:{

                  nickname:function(){

                    return $("#nickname").val();

                  }
              }

            }

          },
          //密码
           password:{

            required:true,
            password:true

          },
          //确认密码
          conf_password:{
            required:true,
            equalTo:"#password"
          },

          //验证码
          code:{

            required:true,
            //异步处理处理验证码
            remote:{

              url:"<{:U('Home/User/checkCode')}>",
              type:'post',
              dataType:'json',
              data:{

                  code:function(){

                    return $('#yzcode').val();

                  }

              }

            }


          }


        },

        messages:{


          mobile:{

            required:'不允许为空',

          },

          nickname:{

            required:'不允许为空',

            remote:'该昵称已经存在'

          },

          password:{

            required:'密码不允许为空',

          },

           conf_password:{
            required:'请确认密码',
            equalTo:"两次输入的密码不相同",
          },

          code:{

            required:'请输入验证码',
            remote:''
          }


        }




    });

    //点击验证码的时候刷新验证码

    var Verify = $('#yzm').attr('src');

     Verify = Verify.substr(0, Verify.indexOf('.html'));
    // alert(str);

    $("#yzm").click(function(event) {

        $(this).attr('src', Verify+'/'+Math.random());

    });



// alert("<{:U('Home/Register/checkNickname')}>");

    </script>

</html>